import torch
from torch.nn import functional as F
import numpy as np

a = [23, 45, 56]
a = tuple(a)
print(a)
exit()


a = torch.arange(1, 10).reshape([1, 1, 3, 3])
a = a.float()
a = torch.cat([a, a, a], dim=1)
a = torch.cat([a, a, a], dim=0)
print("初始的数据: ")
print("a的shape :", a.shape)
print(a)


b = a.reshape([3, 1, 3, 9])
print("一次reshape后的数据：")
print("b的shape :", b.shape)
print(b)

c = b.transpose(2, 3)
print("一次transpose后的数据：")
print("c的shape :", c.shape)
print(c)

print("test :")
d = torch.einsum('bcij,bcjk->bcik', c, b)
print("相乘后的数据：")
print("d的shape :", d.shape)
print(d)

print("进行softmax：")
e = F.softmax(d, dim=3)
print(e)





